<template>
  <h1>登录样例页面</h1>
  <el-button type="success" @click="b_login">点击登录</el-button>
  <h2>登录会向后端发“tem_666”的信息，后端会返回“ok”的数据。页面会跳转到hello页面</h2>
  <h1> Redis服务测试</h1>
  <h2>{{redis}}</h2>
</template>
<script>
import LogAndResApi from "@/api/common/LogAndRes"

export default {
  name: "Login_com",
  data(){
    return {
      redis:'',
    }
  },
  methods:{
    b_login(){
      LogAndResApi.log_api().then(res=>{
        console.log(res.data);
      })
    }
  },
  created(){
    LogAndResApi.redis_api().then(res=>{
      if(res.data==='ok'){
        this.redis=res.data;
      }
    })
  }
}
</script>
<style scoped>
</style>